//index.js
const app = getApp()
const { envList } = require('../../envList.js')

Page({
  data: {
    defaultBarHeight:20,
    // 弹窗
    dialogShow: false,
    buttons: [
        {
            extClass:'quitrText',
            text: '取消'
        },
        {
            extClass:'confirmText',
            text:'确定'
        }
    ]
  },
  toSunfeng(e){
    wx.navigateTo({
      url: '../sunfen/sunfen',
      events: e,
      success: (result) => {},
      fail: (res) => {},
      complete: (res) => {},
    })
  },
  toSendToHome(events){
    wx.navigateTo({
      url: '../sendToHome/sendToHome',
      events: events,
      success: (result) => {},
      fail: (res) => {},
      complete: (res) => {},
    })
  },
  openddzq: function (events) {
    // this.setData({
    //     dialogShow: true
    // })
    wx.navigateTo({
      url: '../toStore/toStore',
      events: events,
      success: (result) => {},
      fail: (res) => {},
      complete: (res) => {},
    })
  },
  tapDialogButton(e) {
    this.setData({
        dialogShow: false
    })
  },
  /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {
      let menuButtonObject = wx.getMenuButtonBoundingClientRect();
      // console.log(menuButtonObject)
      wx.getSystemInfo({
          success: res => {
              // console.log(res)
              let statusBarHeight = res.statusBarHeight;
              this.data.defaultBarHeight = statusBarHeight
              // console.log(statusBarHeight)
          },
          fail(err) {
            console.log(err);
          }
        })
  }
})
